<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 300px;
            height: 300px;
            background-color: blanchedalmond;
        }

        .inner {
            width: 150px;
            height: 150px;
            background-color: blueviolet;
        }
    </style>
</head>

<body>
    <div class="box" id="box">
        <div class="inner"></div>
    </div>
    <input type="text" id="input">
    <script>
        const boxEle = document.getElementById('box');
        const inputEle = document.getElementById('input');

        document.onkeydown = function () {
            console.log("1111111111");
        }

        inputEle.onkeydown = function (e) {
            if (e.keyCode == 13) {
                console.log("按下");
            }
        }
        inputEle.onkeyup = function () {
            console.log("松开");
        }

        boxEle.onmousemove = function () {
            // console.log("move");
        }

        boxEle.onmouseenter = function () {
            console.log("鼠标移入 enter");
        }
        boxEle.onmouseleave = function () {
            console.log("鼠标移出 leave");
        }
        boxEle.onmouseover = function () {
            console.log("鼠标移入 over");
        }
        boxEle.onmouseout = function () {
            console.log("鼠标移出 out");
        }

        boxEle.addEventListener('mousemove', function () {

        })
    </script>
</body>

</html>